home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / source / lib / chunky_lib.lha / Chunky / GetPixel32Z.ass < prev    next >
Encoding:
Text File  |  2000-12-06  |  458 b   |  32 lines

  1.  
  2. ; GetPixel32Z(chunky:a0:PTR TO chunky,x:d0:LONG,y:d1:LONG)(L,F)
  3.  
  4.     machine    mc68020
  5.     fpu    1
  6.  
  7.     xdef    _GetPixel32Z
  8.  
  9. _GetPixel32Z
  10.     cmpa.l    #0,a0
  11.     beq.s    .out
  12.     tst.l    d0
  13.     blt.s    .out
  14.     tst.l    d1
  15.     blt.s    .out
  16.     cmp.l    (a0),d0
  17.     bge.s    .out
  18.     cmp.l    (4,a0),d1
  19.     bge.s    .out
  20.  
  21.     muls.l    (a0),d1
  22.     add.l    d0,d1
  23.     lsl.l    #2,d1        ; d1 now contains position in buffer
  24.     movea.l    (8,a0),a1
  25.     move.l    (a1,d1.l),d0
  26.     movea.l    (12,a0),a1
  27.     fmove.s    (a1,d1.l),fp0
  28.     rts
  29. .out    moveq    #-1,d0
  30.     fmove.s    #0,fp0
  31.     rts
  32.